home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cbibcode.arc / SETMEM.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-05  |  331 b   |  11 lines

  1. /* setmem.c, from p.160 of Turbo C Bible  */
  2. /* Sets a specified number of bytes of a buffer to a given value. */
  3. #include <stdio.h>
  4. #include <mem.h>
  5. static char buffer[41];                /* Destination buffer */
  6. main()
  7. {
  8.     setmem(buffer, 40, 'Z');
  9.     buffer[40] = '\0';
  10.     printf("The buffer now contains: %s\n", buffer);
  11. }